<html>
  <meta charset="UTF-8">
  <head>
    <script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="js/codemirror.js"></script>
    <script type="text/javascript" src="js/lz-string.js"></script>
    <script type="text/javascript" src="mode/javascript/javascript.js"></script>
    <script type="text/javascript" src="js/cbi.js"></script>
    <link rel="stylesheet" href="css/codemirror.css">
    <link href="css/feedback.css" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.1.7/css/fork-awesome.min.css" integrity="sha256-gsmEoJAws/Kd3CjuOQzLie5Q3yshhvmo7YNtBG7aaEY=" crossorigin="anonymous">
<style>
form {
  margin-block-end: 0;
}

button {
  border-radius: 4px;
  margin: 2px;
}

.buttonVert {
  display: inline-block;
  padding: 2px 4px;
  margin: 3px 2px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  outline: none;
  color: #fff;
  background-color: #85db85;
  border: none;
  border-radius: 5px;
  box-shadow: 2px 2px #999;
}

.buttonVert:hover {background-color: #52c452}

.buttonVert:active {
  background-color: #52c452;
  box-shadow: 0 0 #666;
  transform: translateY(2px) translateX(2px);
}

.CodeMirror {
  background: transparent;
}

.CodeMirror-linenumber {
  color: blue;
}

#srcCode:not(.readOnly) {
  background-color: white;
}

#srcCode.readOnly {
  background-color: #eee;
}

.error {
  background-color: lightpink;
}

</style>
  </head>
  <body style="background-color: lightsteelblue">
    <div style="text-align: center">
      <div>
        <i><script type="text/javascript">document.write(cbiGetVersion(true));</script></i>
        by <a href="https://www.planet-casio.com/Fr/compte/voir_profil.php?membre=krevo_">Krevo_ </a><br><br>

        <div>
          <canvas id="canvas1" width="508" height="252" style="position: absolute"></canvas>
          <canvas id="canvas2" width="508" height="252" style="position: absolute;"></canvas>
          <canvas id="canvas3" width="508" height="252" style="z-index:-1; position: relative; background-color: white"></canvas>
        </div>

        <div style="display: block; padding-bottom: 4px;" >
         <!-- onclick="calcKeyDown(79); setTimeout(calcKeyUp, 200)" -->
         <button class="buttonVert" onmousedown="calcKeyDown(79)" onmouseup="calcKeyUp()" >F1</button>
         <button class="buttonVert" onmousedown="calcKeyDown(69)" onmouseup="calcKeyUp()" >F2</button>
         <button class="buttonVert" onmousedown="calcKeyDown(59)" onmouseup="calcKeyUp()" >F3</button>
         <button class="buttonVert" onmousedown="calcKeyDown(49)" onmouseup="calcKeyUp()" >F4</button>
         <button class="buttonVert" onmousedown="calcKeyDown(39)" onmouseup="calcKeyUp()" >F5</button>
         <button class="buttonVert" onmousedown="calcKeyDown(29)" onmouseup="calcKeyUp()" >F6</button>
         <button class="buttonVert" onmousedown="calcKeyDown(38)" onmouseup="calcKeyUp()" >←</button>
         <button class="buttonVert" onmousedown="calcKeyDown(28)" onmouseup="calcKeyUp()" >↑</button>
         <button class="buttonVert" onmousedown="calcKeyDown(37)" onmouseup="calcKeyUp()" >↓</button>
         <button class="buttonVert" onmousedown="calcKeyDown(27)" onmouseup="calcKeyUp()" >→</button>
        <br>
         <button class="buttonVert" onmousedown="calcKeyDown(71)" onmouseup="calcKeyUp()" >0</button>
         <button class="buttonVert" onmousedown="calcKeyDown(72)" onmouseup="calcKeyUp()" >1</button>
         <button class="buttonVert" onmousedown="calcKeyDown(62)" onmouseup="calcKeyUp()" >2</button>
         <button class="buttonVert" onmousedown="calcKeyDown(52)" onmouseup="calcKeyUp()" >3</button>
         <button class="buttonVert" onmousedown="calcKeyDown(73)" onmouseup="calcKeyUp()" >4</button>
         <button class="buttonVert" onmousedown="calcKeyDown(63)" onmouseup="calcKeyUp()" >5</button>
         <button class="buttonVert" onmousedown="calcKeyDown(53)" onmouseup="calcKeyUp()" >6</button>
         <button class="buttonVert" onmousedown="calcKeyDown(74)" onmouseup="calcKeyUp()" >7</button>
         <button class="buttonVert" onmousedown="calcKeyDown(64)" onmouseup="calcKeyUp()" >8</button>
         <button class="buttonVert" onmousedown="calcKeyDown(54)" onmouseup="calcKeyUp()" >9</button>
        <br>
         <button class="buttonVert" onmousedown="calcKeyDown(61)" onmouseup="calcKeyUp()" >.</button>
         <button class="buttonVert" onmousedown="calcKeyDown(42)" onmouseup="calcKeyUp()" >+</button>
         <button class="buttonVert" onmousedown="calcKeyDown(32)" onmouseup="calcKeyUp()" >-</button>
         <button class="buttonVert" onmousedown="calcKeyDown(43)" onmouseup="calcKeyUp()" >×</button>
         <button class="buttonVert" onmousedown="calcKeyDown(33)" onmouseup="calcKeyUp()" >÷</button>
         <button class="buttonVert" onmousedown="calcKeyDown(44)" onmouseup="calcKeyUp()" >DEL</button>
         <button class="buttonVert" onmousedown="calcKeyDown(31)" onmouseup="calcKeyUp()" >Exe</button>
        </div>
         <form action="">
           <input type="radio" id="black_white" name="colorScheme" onchange="chooseColorScheme('black&white');" >Black/White
           <input type="radio" id="blue_green" name="colorScheme" onchange="chooseColorScheme('blue&green');" >Blue/Green
           <input type="radio" id="multicolor" name="colorScheme" onchange="chooseColorScheme('multicolor');" checked="checked">Multicolor
         </form>
         <form action="">
           <input type="radio" id="lowRes" name="res" onchange="selectResolution('low');" >LowRes
           <input type="radio" id="hiRes" name="res" onchange="selectResolution('hi');" checked="checked">HiRes
         </form>
         <button class="" onclick="swap();">G ↔ T</button>
       <br><br>
        <button onclick="executeCode();"><i class="fa fa-play" aria-hidden="true"></i>  Execute</button>
        <button onclick="stopCodeExecution()"><i class="fa fa-stop" aria-hidden="true"></i> STOP</button>
        <!-- Hidden features for experts/developpers -->
        <span id="devButtons" >
          <button onclick="displayStatusMsg('Log DEBUG is '+(debugToggle()?'On':'Off'))"><i class="fa fa-bug" aria-hidden="true"></i> Log debug On/Off</button>
          <button onclick="displayStatusMsg('Increasing speed. Timeout is now '+adjustTimeout(-1)+' ms')">Speed <i class="fa fa-plus" aria-hidden="true"></i></button>
          <button onclick="displayStatusMsg('Decreasing speed. Timeout is now '+adjustTimeout(1)+' ms')">Speed <i class="fa fa-minus" aria-hidden="true"></i></button>
          <button id="feedback"><i class="fa fa-envelope-o"></i> Send bug report</button>
          <button id="share"><i class="fa fa-share-alt" aria-hidden="true"></i> Share</button>
        </span>
        <div id="statusbar" style="display: none"><span id="status" style="color: red"></span></div>
         <div style="text-align:center; margin: 0px;"><div id="srcCode" style="text-align: left; display: inline-block; width: 75%"><!-- CodeMirror editor --></div></div>

        <textarea style="display: none" id="srcCode0">
""
""
""
"    Hello World !"
        </textarea>
        <textarea style="display: none" id="srcCode1">
5->A
Do
  Locate 6-A,6-A,A
  A-1->A
LpWhile A>0
Locate 6,6,"Ignition !"
        </textarea>
        <textarea style="display: none" id="srcCode2">
ViewWindow 1,10,0,10,1,0
Lbl 0
Cls
1->A:1->B
Prog "RNDCOLOR"
Lbl 1
F-Line 1,A,B,10
Isz A:Isz B:A<>11=>Goto 1
1->A:10->B
Prog "RNDCOLOR"
Lbl 2
F-Line A,10,10,B
Isz A:Dsz B:Goto 2
10->A:10->B
Prog "RNDCOLOR"
Lbl 3
F-Line A,1,10,B
Dsz A:Dsz B:Goto 3
10->A:1->B
Prog "RNDCOLOR"
Lbl 4
F-Line A,1,1,B
Isz B:Dsz A:Goto 4
Goto 0

@@ Prog "RNDCOLOR" ( )

1+Int (7Ran# ) -> F
If F = 1
Then Plot/Line-Color Black
Else If F = 2
Then Plot/Line-Color Blue
Else If F = 3
Then Plot/Line-Color Red
Else If F = 4
Then Plot/Line-Color Magenta
Else If F = 5
Then Plot/Line-Color Green
Else If F = 6
Then Plot/Line-Color Cyan
Else If F = 7
Then Plot/Line-Color Yellow
IfEnd
IfEnd
IfEnd
IfEnd
IfEnd
IfEnd
IfEnd
        </textarea>
        <textarea style="display: none" id="srcCode3">
-500->A
ViewWindow 1,127,0,1,63,0
Lbl 1
Prog "RNDCOLOR"
Plot Ran#*127, Ran#*63
Isz A
Goto 1

@@ Prog "RNDCOLOR" ( )

1+Int (7Ran# ) -> F
If F = 1
Then Plot/Line-Color Black
Else If F = 2
Then Plot/Line-Color Blue
Else If F = 3
ThenPlot/Line-Color Red
Else If F = 4
ThenPlot/Line-Color Magenta
Else If F = 5
ThenPlot/Line-Color Green
Else If F = 6
ThenPlot/Line-Color Cyan
Else If F = 7
Then Plot/Line-Color Yellow
IfEnd
IfEnd
IfEnd
IfEnd
IfEnd
IfEnd
IfEnd
        </textarea>
        <textarea style="display: none" id="srcCode4">
ViewWindow 0,126,0,62,0,0
For 0->B To 13
  For 0->A To 25
    RanInt#(0,1)->C
    F-line 5A,5(B+C),5(A+1),5(B+1-C)
  Next
Next
       </textarea>
        <textarea style="display: none" id="srcCode5">
1->A
Do
  Locate 1,A,Ran#
  1+A->A
LpWhile A<=7
       </textarea>
        <textarea style="display: none" id="srcCode6">
"   CALCUL IMC"
"Poids (kg) "?->P
"Taille (m) "?->T
Int(P/(T*T)*100)/100
       </textarea>
        <textarea style="display: none" id="srcCode7">
#Program name: CALUNIV
#Password: <no password>
#lowres
'
'CALENDRIER UNIVERSEL
'
' v1.0 by Krevo_
'
ViewWindow 1,127,0,1,63,0
F-Line 76,8,76,55
7->E
Lbl 4
F-Line 10*E-4,8,10*E-4,55
F-Line 6,8*E-1,76,8*E-1
Dsz E
Goto 4
7->E:0->C
Text 3,10,"L"
Text 3,19,"M"
Text 3,29,"M"
Text 3,40,"J"
Text 3,50,"V"
Text 3,60,"S"
Text 3,70,"D"
"CALENDRIER UNIVERSEL"
Lbl 1
"ANNEE "?->Y
"MOIS "?->N
1->D
N!=Int (N)=>Goto 1
Y!=Int (Y)=>Goto 1
D!=Int (D)=>Goto 1
Int ((14-N)/12)->C
Y-C->A
N+12*C-2->M
D+A+Int (A/4)-Int (A/100)+Int (A/400)+Int ((31*M)/12)->J
J-Int (J/7)*7->P
P=0=>7->P
30->J
(N/2)!=Int (N/2)=>N<=7=>31->J
(N/2)=Int (N/2)=>N>=8=>31->J
N=2=>28->J
N=2=>Frac (Y/4)=0=>Frac (Y/100)>0=>29->J
N=2=>Frac (Y/400)=0=>29->J
1->N
Lbl 5
N+P-1->O
Int ((O-1)/7)+2->E
O-(E-2)*7->D
8-E->E
(D-1)*10+8->A
E*8+5->B
Int (N/10)->C
C!=0=>Text 64-B,A,C
A+4->A
Frac (N/10)*10->C
Text 64-B,A,C
Isz N
N<=J=>Goto 5
#End of part
       </textarea>
        <textarea style="display: none" id="srcCode8">
#
# CITY
# 1 ou 2 Joueurs
#
# VOUS ETES LE PERSONNAGE DE GAUCHE SUR L' ECRAN GRAPHIQUE. VOTRE BUT : TUER
# AVEC UN TIR DE MORTIER BIEN PLACE VOTRE ENNEMI DE TOUJOURS
# POUR CELA, VOUS DEVEZ INDIQUER L'ANGLE (EN DEGRE), PUIS LA FORCE DE TIR (ENTRE 50 ET 100 ENVIRON).
# --------------------

Prog "CITY"

@@ Prog "CITY" ( )

ViewWindow 4,645,0,400,4,0
Deg
0->A~Z
10->Dim List 1
10->D
Lbl 0
Int (Ran# *230)+170->List 1[D]
Dsz D
Goto 0
Prog "CITY3"
2->S:101->T:Prog "CITY2"
9->S:548->T:Prog "CITY2"
0->R
Lbl 5
"JOUEURS 1 2 "?->E
E!=1=>E!=2=>Goto 5
1->P
Plot X,Y
Lbl 1
P=1=>0.15->Q
P=2=>-0.15->Q
Plot X,Y:Line
Isz Z
"ANGLE "?->U
P=2=>-U->U
"FORCE "?->V
V*cos U->S
V*sin U->T
0->C
Lbl 2
C+Q->C
S*C+.5*R*C*C->A
P=1=>101+A->A
P=2=>548+A->A
List 1[7*P-5]+(.5*9.81*C*C)-50-T*C->B
Plot A,B
Int ((A-5)/64)+1->D
P=1=>A>533=>A<563=>B<List 1[D]=>B>List 1[D]-58=>Goto 4
P=2=>A>90=>A<111=>B<List 1[D]=>B>List 1[D]-58=>Goto 4
D>0=>D<11=>B<List 1[D]=>Goto 2
E=2=>3-P->P
Goto 1
Lbl 4
9->S:548->T
P=2=>2->S
P=2=>101->T
Prog "CITY4"
Plot X,Y:Line
"GAGNE"
E=1=>"PTS"
E=2=>"GAGNANT:"
E=1=>240-40*Z◢
E=2=>P◢
""

@@ Prog "CITY2" ( )

16->D
Plot T-D,List 1[S]
Plot T,List 1[S]-25
Line
Plot T+D,List 1[S]
Line
Plot T-D,List 1[S]-32
Plot T+D,List 1[S]-32
Line
Plot T,List 1[S]-45
Plot T,List 1[S]-25
Line
Plot T,List 1[S]-45
Plot T-(D/3),Y
Line
Plot X,List 1[S]-58
Line
Plot T+(D/3),Y
Line
Plot X,List 1[S]-45
Line
Plot T,List 1[S]-45
Line

@@ Prog "CITY3" ( )

Cls
0->D
Lbl 1
Isz D
64*(D-1)+5->W
Plot W,400
Plot W,List 1[D]
Line
Plot W+64,List 1[D]
Line
Plot W+64,400
Line
D<10=>Goto 1

@@ Prog "CITY4" ( )

Deg
-180->A
Lbl 1
Rec(45,A)
List Ans[0]+T->X
List Ans[1]+List 1[S]->Y
Plot X,Y
Plot T,List 1[S]
Line
15+A->A
A<=0=>Goto 1
       </textarea>
        <textarea style="display: none" id="srcCode9">
#
# POLYGONE REGULIER
#
Deg
Mcl
Range 1,127,0,1,63,0
" -- POLYGON -- "
"NB COTE "?->N
"RAYON (px) "?->r
360/N->A
Plot 64+r,32
0->θ
Lbl 1
θ+A->θ
Rec(r,θ)
Plot List Ans[0]+64,List Ans[1]+32
Line
θ<360=>Goto 1
       </textarea>
        <textarea style="display: none" id="srcCode10">
"Hello !"
"Have a break ?"◢
"Bye."
       </textarea>
        <textarea style="display: none" id="srcCode11">
Locate 3,4,"GetKey :"
Lbl 0
Getkey→Z
If Z≠O
Then Locate 12,4,"   "
IfEnd
Locate 12,4,Z
Z→O
Goto 0
       </textarea>
        <textarea style="display: none" id="srcCode12">
Locate 5,1,"== MENU =="
Locate 9,3,"Prog 1"
Locate 9,4,"Prog 2"
Locate 9,5,"Prog 3"
Locate 9,6,"Exit"

0->K
1->A
Lbl 1
GetKey->K
A->O
K=28=>A-1->A
K=37=>A+1->A
A>4=>1->A
A<1=>4->A
A<>O=>Locate 6,O+2,"  "
Locate 6,A+2,"=>"
K=31=>Goto 2
Goto 1
Lbl 2
ClrText
Locate 1,1,"You choose..."
A=1=>Locate 2,2,"... prog 1"
A=2=>Locate 2,2,"... prog 2"
A=3=>Locate 2,2,"... prog 3"
A=4=>Locate 2,2,"... to exit !"
       </textarea>
        <textarea style="display: none" id="srcCode13">
#lowres
Text 10,15,"A"
Text 10,25,"B"
Text 10,35,"And"
Text 10,49,"Or"
Text 10,60,"Xor"
Text 10,75,"Not A"
Text 10,98,"Not B"

0->A
20->I
Do
0->B
Do
Text I,15,A
Text I,25,B
Text I,40,A And B
Text I,51,A Or B
Text I,63,A Xor B
Text I,82,Not A
Text I,105,Not B
I+7->I
B+1->B
LpWhile B<2
A+1->A
LpWhile A<2
       </textarea>
        <textarea style="display: none" id="srcCode14">
{0,1,2,3,4,5}->List 1
6->Dim List 2
Seq(X*X, X, 0, 5, 1->List 3
List 1->List 4
Locate 1,1,"List 1[6] = "
Locate 1,2,"List 2[6] = "
Locate 1,3,"List 3[6] = "
Locate 1,4,"List 4[6] = "
Locate 1,5,"List Ans[6] = "
Locate 13,1,List 1[6]
Locate 13,2,List 2[6]
Locate 13,3,List 3[6]
Locate 13,4,List 4[6]
List 3
Locate 13,5,List Ans[6]
       </textarea>
        <textarea style="display: none" id="srcCode15">
{1,2,3,4}->List 1
{7,8,9,10,11->List 2
7→Dim List 3
Locate 1,1,"Dim List 1 ="
Locate 1,2,"Dim List 2 ="
Locate 1,3,"Dim List 3 ="
Locate 14,1,Dim List 1
Locate 14,2,Dim List 2
Locate 14,3,Dim List 3
       </textarea>
        <textarea style="display: none" id="srcCode16">
ClrList
5->Dim List 3
List 3[4]_
11->List 3[4]
12->List 3[5]
File 2
15→Dim List 1
{4,3,2,1}->List 2
{5,3,2,1->List 3
6->Dim List 3
26->List 3[4]
27->List 3[5]
List 3[4]_
File 1
List 3[4]_
       </textarea>
        <textarea style="display: none" id="srcCode17">
-100->A
ViewWindow 1,127,0,1,63,0
Lbl 1
Prog "RNDCOLOR"
Prog "RNDTHICK"
F-Line 127Ran# ,63Ran# ,127Ran# ,63Ran#
Isz A
Goto 1

@@ Prog "RNDCOLOR" ( )

1+Int (7Ran# ) -> F
If F = 1
Then Plot/Line-Color Black
Else If F = 2
Then Plot/Line-Color Blue
Else If F = 3
ThenPlot/Line-Color Red
Else If F = 4
ThenPlot/Line-Color Magenta
Else If F = 5
ThenPlot/Line-Color Green
Else If F = 6
ThenPlot/Line-Color Cyan
Else If F = 7
Then Plot/Line-Color Yellow
IfEnd
IfEnd
IfEnd
IfEnd
IfEnd
IfEnd
IfEnd

@@ Prog "RNDTHICK" ( )

1+Int (5Ran# ) -> F
If F = 1
Then S-L-Dot
Else If F = 2
Then S-L-Broken
Else If F = 3
Then S-L-Thick
Else If F = 4
Then S-L-Normal
Else If F = 5
Then S-L-Thin
IfEnd
IfEnd
IfEnd
IfEnd
IfEnd
       </textarea>
        <textarea style="display: none" id="srcCode18">
#Program name: IMG'FOOT
#hires
#multicolor
'Inspired from "Fifaa 19" by Manolo
Rad
Plot/Line-Color Black
S-L-Normal
ViewWindow 1, 379, 0, 187, 1, 0
For 1 -> U To 187 Step 5
	Green SketchThick Horizontal U
Next
F-Line 6, 72, 1, 67
F-Line 6, 116, 1, 121
F-Line 374, 72, 379, 67
F-Line 374, 116, 379, 121
F-Line 1, 67, 1, 121
F-Line 379, 67, 379, 121
Circle 190, 94, 50
Circle 190, 94, 2
Vertical 190
F-Line 1, 62, 26, 62
F-Line 1, 126, 26, 126
F-Line 26, 62, 26, 126
F-Line 379, 62, 354, 62
F-Line 379, 126, 354, 126
F-Line 354, 62, 354, 126
F-Line 1, 34, 51, 34
F-Line 1, 154, 51, 154
F-Line 51, 34, 51, 154
F-Line 379, 34, 329, 34
F-Line 379, 154, 329, 154
F-Line 329, 34, 329, 154
π -> Z
PlotOn 51,54
Do
	51 + 40*sin (Z) -> A
	94 + 40*cos (Z) -> B
	PlotOn A, B
        Line
	Z - π/10 -> Z
LpWhile Z > -.1
π -> Z
PlotOn 329,54
Do
	329 + 40*sin (Z) -> A
	94 + 40*cos (Z) -> B
	PlotOn A, B
        Line
	Z + π/10 -> Z
LpWhile Z < 2π + .1
       </textarea>
        <textarea style="display: none" id="srcCode19">
#Program name: WORLDMAP
#hires
#multicolor
'Inspired from "Geograph" game by Disperseur

ViewWindow 1, 127, 0, 1, 63, 0

'MAP'
For 63 -> r To 1 Step -1
	Blue SketchThick Horizontal r
Next

Plot/Line-Color Green
F-Line 51, 54, 54, 54
F-Line 37, 53, 42, 53
F-Line 45, 53, 54, 53
F-Line 56, 53, 57, 53
F-Line 36, 52, 40, 52
F-Line 43, 52, 55, 52
F-Line 64, 52, 66, 52
F-Line 88, 52, 89, 52
F-Line 37, 51, 39, 51
F-Line 42, 51, 55, 51
F-Line 29, 50, 30, 50
F-Line 45, 50, 55, 50
F-Line 86, 50, 92, 50
F-Line 25, 49, 29, 49
F-Line 32, 49, 34, 49
F-Line 36, 49, 39, 49
F-Line 46, 49, 54, 49
F-Line 81, 49, 82, 49
F-Line 85, 49, 97, 49
F-Line 102, 49, 104, 49
F-Line 14, 48, 19, 48
F-Line 23, 48, 25, 48
F-Line 28, 48, 31, 48
F-Line 39, 48, 41, 48
F-Line 47, 48, 54, 48
F-Line 68, 48, 70, 48
F-Line 83, 48, 107, 48
F-Line 109, 48, 113, 48
F-Line 13, 47, 37, 47
F-Line 40, 47, 42, 47
F-Line 46, 47, 51, 47
F-Line 66, 47, 72, 47
F-Line 74, 47, 81, 47
F-Line 83, 47, 116, 47
F-Line 12, 46, 36, 46
F-Line 38, 46, 41, 46
F-Line 46, 46, 48, 46
F-Line 55, 46, 56, 46
F-Line 65, 46, 113, 46
F-Line 12, 45, 33, 45
F-Line 38, 45, 39, 45
F-Line 47, 45, 48, 45
F-Line 63, 45, 66, 45
F-Line 68, 45, 108, 45
F-Line 110, 45, 113, 45
F-Line 12, 44, 14, 44
F-Line 19, 44, 32, 44
F-Line 38, 44, 40, 44
F-Line 63, 44, 66, 44
F-Line 68, 44, 104, 44
F-Line 13, 43, 14, 43
F-Line 21, 43, 34, 43
F-Line 38, 43, 42, 43
F-Line 59, 43, 60, 43
F-Line 64, 43, 65, 43
F-Line 68, 43, 103, 43
F-Line 109, 43, 111, 43
F-Line 21, 42, 35, 42
F-Line 37, 42, 42, 42
F-Line 58, 42, 61, 42
F-Line 63, 42, 104, 42
F-Line 22, 41, 42, 41
F-Line 62, 41, 104, 41
F-Line 22, 40, 40, 40
F-Line 61, 40, 72, 40
F-Line 74, 40, 104, 40
F-Line 22, 39, 39, 39
F-Line 61, 39, 69, 39
F-Line 74, 39, 75, 39
F-Line 77, 39, 80, 39
F-Line 82, 39, 104, 39
F-Line 106, 39, 107, 39
F-Line 22, 38, 38, 38
F-Line 58, 38, 61, 38
F-Line 68, 38, 76, 38
F-Line 78, 38, 102, 38
F-Line 22, 37, 36, 37
F-Line 58, 37, 60, 37
F-Line 68, 37, 76, 37
F-Line 79, 37, 100, 37
F-Line 105, 37, 106, 37
F-Line 23, 36, 36, 36
F-Line 59, 36, 64, 36
F-Line 73, 36, 100, 36
F-Line 23, 35, 34, 35
F-Line 58, 35, 100, 35
F-Line 24, 34, 29, 34
F-Line 57, 34, 71, 34
F-Line 73, 34, 100, 34
F-Line 25, 33, 29, 33
F-Line 56, 33, 72, 33
F-Line 74, 33, 80, 33
F-Line 84, 33, 99, 33
F-Line 27, 32, 29, 32
F-Line 56, 32, 73, 32
F-Line 75, 32, 80, 32
F-Line 85, 32, 89, 32
F-Line 92, 32, 97, 32
F-Line 29, 31, 32, 31
F-Line 56, 31, 73, 31
F-Line 75, 31, 78, 31
F-Line 85, 31, 87, 31
F-Line 94, 31, 96, 31
F-Line 56, 30, 74, 30
F-Line 86, 30, 87, 30
F-Line 94, 30, 97, 30
F-Line 33, 29, 41, 29
F-Line 57, 29, 77, 29
F-Line 102, 29, 103, 29
F-Line 36, 28, 43, 28
F-Line 58, 28, 60, 28
F-Line 63, 28, 77, 28
F-Line 35, 27, 44, 27
F-Line 64, 27, 75, 27
F-Line 94, 27, 95, 27
F-Line 97, 27, 102, 27
F-Line 35, 26, 46, 26
F-Line 64, 26, 74, 26
F-Line 95, 26, 96, 26
F-Line 98, 26, 99, 26
F-Line 107, 26, 108, 26
F-Line 35, 25, 49, 25
F-Line 65, 25, 73, 25
F-Line 107, 25, 111, 25
F-Line 35, 24, 49, 24
F-Line 66, 24, 74, 24
F-Line 101, 24, 102, 24
F-Line 110, 24, 111, 24
F-Line 36, 23, 48, 23
F-Line 66, 23, 74, 23
F-Line 103, 23, 106, 23
F-Line 38, 22, 48, 22
F-Line 65, 22, 73, 22
F-Line 76, 22, 77, 22
F-Line 102, 22, 109, 22
F-Line 38, 21, 47, 21
F-Line 66, 21, 72, 21
F-Line 100, 21, 110, 21
F-Line 38, 20, 46, 20
F-Line 66, 20, 72, 20
F-Line 98, 20, 111, 20
F-Line 38, 19, 45, 19
F-Line 67, 19, 71, 19
F-Line 99, 19, 111, 19
F-Line 38, 18, 44, 18
F-Line 67, 18, 70, 18
F-Line 99, 18, 111, 18
F-Line 38, 17, 43, 17
F-Line 106, 17, 109, 17
F-Line 38, 16, 42, 16
F-Line 107, 16, 108, 16
F-Line 38, 15, 41, 15
F-Line 38, 14, 40, 14
F-Line 114, 14, 115, 14
F-Line 38, 13, 40, 13
F-Line 38, 12, 39, 12
       </textarea>
        <textarea style="display: none" id="srcCode20">
# Test Menu()
Menu "Couleur", "bleu", 1, "cyan", 2, "orange", 3, "rouge", 4, "jaune", 5, "vert", 6
Lbl 1
ClrText
Locate 8,3,"bleu !"
Goto 9
Lbl 2
ClrText
Locate 8,3,"cyan !"
Goto 9
Lbl 3
ClrText
Locate 8,3,"orange !"
Goto 9
Lbl 4
ClrText
Locate 8,3,"rouge !"
Goto 9
Lbl 5
ClrText
Locate 8,3,"jaune !"
Goto 9
Lbl 6
ClrText
Locate 8,3,"vert !"
Goto 9
Lbl 9
Locate 15,5,"End."
        </textarea>
        <textarea style="display: none" id="srcCode21">
# Tentacules
# adapted from Alexot (https://www.planet-casio.com/Fr/compte/voir_profil.php?membre=alexot)
# see https://www.planet-casio.com/Fr/programmes/programme3871-1-Tentacules-alexot-.html

#Program name: TENTAC
#Password: <no password>

ViewWindow -63, 63, 0, -31, 31, 0
S-L-Thin
BG-None
Rad
For 1 -> H To 15
	cos (H / 5) / 2 + 0.2 -> G
	Cls
	{-4 -> List 1
	{-4 -> List 2
	{8 -> List 3
	{0 -> List 4
	Prog "TENTAC1"
	StoPict H
Next

Prog "TENTANIM"

@@ Prog "TENTAC1" ( )

#Program name: TENTAC1
#Password: <no password>
For 0 -> r To 10
	1 -> θ
	List 1[θ] + List 3[θ] * cos List 4[θ] -> A
	List 2[θ] + List 3[θ] * sin List 4[θ] -> B
	List 1[θ] + List 3[θ] * cos (List 4[θ] + π / 2) -> C
	List 2[θ] + List 3[θ] * sin (List 4[θ] + π / 2) -> D
	C + List 3[θ] * cos List 4[θ] -> E
	D + List 3[θ] * sin List 4[θ] -> F
	F-Line List 1[θ], List 2[θ], A, B
	F-Line List 1[θ], List 2[θ], C, D
	F-Line A, B, E, F
	F-Line C, D, E, F

	F-Line List 2[θ], -List 1[θ], B, -A
	F-Line List 2[θ], -List 1[θ], D, -C
	F-Line B, -A, F, -E
	F-Line D, -C, F, -E

	F-Line -List 2[θ], List 1[θ], -B, A
	F-Line -List 2[θ], List 1[θ], -D, C
	F-Line -B, A, -F, E
	F-Line -D, C, -F, E

	F-Line -List 1[θ], -List 2[θ], -A, -B
	F-Line -List 1[θ], -List 2[θ], -C, -D
	F-Line -A, -B, -E, -F
	F-Line -C, -D, -E, -F

	C -> List 1[θ]
	D -> List 2[θ]
	List 3[θ] * 0.8 -> List 3[θ
	List 4[θ] + G -> List 4[θ
Next

@@ Prog "TENTANIM" ( )

#Program name: TENTANIM
#Password: <no password>
1 -> θ
1 -> A
Cls
Do
	θ + A -> θ
	θ = 1 Or θ = 15 => A * -1 -> A
	BG-Pict θ
	For 0 -> B To 20
	Next
LpWhile 1
        </textarea>
        <textarea style="display: none" id="srcCode22">
' Teste MOD, Dim List Ans et Augment(
Augment({1,2,3,4,5},{6,7,8,9,10,11,12
For 2->C To 7
  ClrText
  For 1 -> A To Dim List Ans
    Locate 3*(MOD((A-1),C)+1) -2 , Int((A-1)/C)+1, List Ans[A]
  Next
Next
        </textarea>
        <textarea style="display: none" id="srcCode23">
#Program name: LABYRINT
#Password: <no password>
#hires
#multicolor
'Labyrinthe (a simplified version of labybug)
'by Krevo_
'
ViewWindow ﹣1, 377, 0, 185, ﹣1, 0
BG-None
Cls
AxesOff
LabelOff
S-L-Normal
Plot/Line-Color Blue
22 -> C : 23 -> D
F-Line 0, 0, 369, 0
F-Line 0, 0, 0, 177
[[0,1,1,0,0,0,1,0,0,1,1,0,1,0,0,1,0,0][0,1,1,1,0,1,0,0,0,0,1,0,1,1,1,0,0,0][0,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,0,0][0,0,1,0,1,1,1,1,0,0,1,1,0,0,0,1,0,0][0,1,1,0,1,0,1,1,0,1,1,0,0,0,1,0,0,0][0,1,1,0,0,0,1,1,0,1,1,0,1,0,1,0,0,0][0,0,1,0,0,0,1,1,0,0,1,1,0,0,0,1,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]->Mat B
[[0,0,1,1,0,0,0,0,0,1,0,0,0,0,1,1,0,0][0,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,0,0][0,1,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0][0,0,0,1,0,0,0,1,0,1,1,0,1,1,0,0,0,0][0,1,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0][1,0,0,1,1,0,0,1,1,1,1,1,0,1,1,0,0,0][0,1,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0][1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0]]->Mat H
[[1,0,0,0,1,0,1,1,0,1,0,1,1,0,0,1,0,0][1,0,1,0,1,1,0,1,0,0,1,0,1,0,0,1,0,0][0,0,1,1,0,0,1,1,0,1,0,1,1,0,0,1,0,0][1,1,1,0,1,0,1,1,1,0,1,0,0,0,1,1,0,0][1,0,1,0,1,1,1,0,1,0,1,1,1,0,1,1,0,0][0,1,0,1,0,1,0,1,0,1,0,1,1,0,0,1,0,0][0,1,0,1,0,1,1,0,0,1,0,1,1,0,0,1,0,0][0,0,0,1,0,0,1,0,1,0,1,0,0,0,1,1,0,0]]->Mat V
For 1 -> I To 8
	For 1 -> J To 16
		Mat V[I, J => F-Line DJ, CI - C, DJ, CI
		Mat H[I, J => F-Line DJ - D, CI, DJ, CI
		Text CI - C + 5, DJ - D + 6, RanInt#(0, 1
	Next
Next
'Choisir sortie au hasard
RanInt#(0, 1)->H
If H=1 :Then
  RanInt#(5,15)->M
  7RanInt#(0,1)->L
Else
  15->M
  RanInt#(0,7)->L
IfEnd
Green Text LC + 5, MD + 7, "$"
{27, 37, 38, 28 -> List 1
0 -> X : 0 -> Y
While 1
	GetKey -> K
	CY + 5 -> O : DX + 6 -> P
	Y + 1 -> T : X + 1 -> U
	K = List 1[1 => X < 15 => Not Mat V[Y + 1, X + 1 => X + 1 -> X
	K = List 1[3 => X > 0 => Not Mat V[Y + 1, X => X - 1 -> X
	K = List 1[2 => Y < 7 => Not Mat H[Y + 1, X + 1 => Y + 1 -> Y
	K = List 1[4 => Y > 0 => Not Mat H[Y, X + 1 => Y - 1 -> Y
	CY + 5 -> Q
	DX + 6 -> R
	If O != Q Or P != R : Then
		Red Text O, P, Mat B[T, U]
	IfEnd
	Green Text Q, R, "#"
	X = M => Y = L => Break
WhileEnd
"Victoire pour"
"le peuple !"
        </textarea>
        <textarea style="display: none" id="srcCode24">
ViewWindow -2π, 2π, π/4, -1.6, 1.6, 0.5
GridOn
AxesOn
Rad
Cls

.2->S

For Xmin->X to Xmax+S Step S
  Red F-Line X-S, cos (X-S), X, cos X
Next

For Xmin->X to Xmax+S Step S
  Green F-Line X-S, sin (X-S), X, sin X
Next

GridOff
AxesOff
        </textarea>
        <textarea style="display: none" id="srcCode25">
AxesOn
GridOff
ViewWindow -15.1, 15.1, 1, -2.1, 8.1, 1, -10, 20, .2
Rad
Red SketchThin Graph(X,Y)=(2T - 3*sin T, 2 - 3*cos T
        </textarea>
        <br>
        <div style="display: none">
        Load raw content from URL : <input type="text" size="60" id="urlLoader">
        <button onclick="loadFromUrl()">Load</button>
        <br>
        </div>
 List of <a href="availablefunctions.html">currently implemented functions</a> (and list of <a href="knownproblems.html">known problems</a>)<br>
 Sample programs :<br>
        <button onclick="loadProg(0);">Hello World !</button>
        <button onclick="loadProg(25);">Cycloïd</button>
        <button onclick="loadProg(24);">Draw sin/cos</button>
        <button onclick="loadProg(1);">5,4,3,...</button>
        <button onclick="loadProg(2);">Screen saver</button>
        <button onclick="loadProg(17);">Lines</button>
        <button onclick="loadProg(3);">Random dots</button>
        <button onclick="loadProg(5);">Random num</button>
        <button onclick="loadProg(6);">IMC</button>
        <br>
        <button onclick="loadProg(4);">Maze generator</button>
        <button onclick="loadProg(7);">Calendrier</button>
        <button onclick="loadProg(9);">Polygon</button>
        <button onclick="loadProg(10);">Hello ◢</button>
        <button onclick="loadProg(11);">GetKey</button>
        <button onclick="loadProg(12);">Text Menu</button>
        <button onclick="loadProg(8);">City</button>
        <button onclick="loadProg(23);">Labyrinthe</button>
        <button onclick="loadProg(21);">Tentacules</button>
        <br>
        <button onclick="loadProg(19);">World map</button>
        <button onclick="loadProg(18);">Football pitch</button>
        <button onclick="loadProg(13);">Bool. table</button>
        <button onclick="loadProg(14);">List 1</button>
        <button onclick="loadProg(15);">List 2</button>
        <button onclick="loadProg(16);">List 3</button>
        <button onclick="loadProg(22);">Lst2Tab</button>
        <button onclick="loadProg(20);">Menu</button>
        <br><br>
      </div>
    </div>

<div class="feedback-box">
  <div class="content"> <a class="close" href="#"><i class="fa fa-times"></i></a>
    <div class="confirm">
      <h1><strong>BOOOM!</strong> <span>We'll get right on that for ya</span></h1>
    </div>
    <header>Help me to improve the <i>Casio Basic Web Interpreter</i> !</header>
    <section>
      <form id="bugReportForm" action="/">
      <input type="hidden" id="code" name="code">
      <div>
        <label for="name">Last status</label>
        <span style="float: right;" title="Your current program is attached to this message"><i class="fa fa-paperclip" aria-hidden="true"></i> <span id="codesize">xx</span> bytes</span>
      </div>
      <input type="text" id="error" name="error"><br><br>
      <label for="name">Name or Pseudo</label><br>
      <input type="text" name="name"><br><br>
      <label for="email">Email (if you want an answer)</label><br>
      <input type="text" name="email"><br><br>
      <label for="feedback">Message (english or french accepted)</label><br>
      <textarea id="feedbackArea" name="feedback"></textarea>
      <button id='submit'>Send bug report</button>
      </form>
    </section>
  </div>
</div>

<script>
(function($){
  var words = ["Boom!" , "Whammy!", "Booya!" , "Holler!", "Broskee!" , "All Good!" , "Right on!"];
  var feedback = $(".feedback-box");

  //Feedback Toggle
	$("#feedback").on("click" , function(){
		feedback.addClass("show");
	});

  //Close Trigger
	$(".close").on("click" , function(){
    feedback.removeClass("show");
    setTimeout(function(){
      feedback.removeClass("show-confirm").find("textarea").val('');
      console.log("reset")
    }, 1000);
	});

//Submit
  $("#submit").on("click" , function(event){
    event.preventDefault();
    if (!feedback.find("textarea").val() ) {
  //     if( !$("textarea").val() ) {
       feedback.addClass("error");
       setTimeout(function(){
         feedback.removeClass("error");
       }, 500)
    } else {
      console.log("Send feedback !");
      console.log($('#bugReportForm').serialize());
      $.post( "bugreport.php", $( "#bugReportForm" ).serialize() );
      feedback.addClass("show-confirm");
      var randomWord = words[Math.floor(Math.random() * words.length)];
      $(".feedback-box h1 strong").text(randomWord);

      setTimeout(function(){
         feedback.removeClass("show").find("textarea").val('').delay(1000);
      },2000);

       setTimeout(function(){
         feedback.removeClass("show-confirm");
      },2200);
    }
  })
})(jQuery);
</script>

    <script type="text/javascript">

      var myCodeMirror;

      function loadFromUrl() {
        var urlToLoad = document.getElementById("urlLoader").value;

        var request = new XMLHttpRequest();
        request.open('GET', urlToLoad, true);

        request.onreadystatechange = function() {
          if (this.readyState === 4) {
            if (this.status >= 200 && this.status < 400) {
              // Success!
              var srcCode = this.responseText;
              document.getElementById("srcCode").value = srcCode;
              executeCode();
            } else {
              document.getElementById("status").innerHTML = 'Unable to load content from Url !';
            }
          }
        };

        request.send();
        request = null;
      }

      function loadProg(progNumber) {
        stopCodeExecution();
        var srcCode = document.getElementById("srcCode"+progNumber).value;
        // document.getElementById("srcCode").value = srcCode;
        myCodeMirror.setValue(srcCode);
        executeCode();
      }

      function loadProgFromSrc(srcCode) {
        stopCodeExecution();
        myCodeMirror.setValue(srcCode);
        executeCode();
      }

      function displayStatusMsg(statusMsg, detailLong) {
        document.getElementById("error").value = statusMsg;
        document.getElementById("feedbackArea").value = 'Full error was : \n' + detailLong;
        $("#statusbar").show();
        document.getElementById("status").innerHTML = statusMsg + (detailLong ? (' <span title="' + detailLong + '"><i class="fa fa-question-circle" aria-hidden="true"></i></span>') : '');
      }

      function removeErrorLines() {
          var lineCount = myCodeMirror.getDoc().lineCount();
          for (var i = 0; i< lineCount; i++) {
              myCodeMirror.getDoc().removeLineClass(i, "background", "error");
          }
      }

      function executeCode() {
        removeErrorLines();
        var srcCode = myCodeMirror.getValue();
        $("#code").val(srcCode);
        $("#codesize").text(srcCode.length);
        document.getElementById("canvas1").focus();
        document.getElementById("srcCode").className = 'readOnly';
        myCodeMirror.setOption("readOnly", "nocursor");
        myCodeMirror.setOption("className", "readOnly");
        document.getElementById("error").value = '';
        document.getElementById("status").innerHTML = '';
        $("#statusbar").hide();
        if (idTimerMain == 0) {
          jsccRun(srcCode, function(errorCode, msg, programs, detail, lineNumber) {
              if (errorCode > 0) {
                  if (detail && detail.indexOf("\n") != -1) {
                    displayStatusMsg(msg, detail);
                  } else {
                    displayStatusMsg(msg + (detail ? detail : ""));
                  }
                  if (lineNumber) {
                    myCodeMirror.getDoc().addLineClass(lineNumber - 1, "background", "error");
                    jumpToLine(lineNumber);
                  }
              }
              //document.getElementById("srcCode").disabled = false;
              document.getElementById("srcCode").className = '';
              myCodeMirror.setOption("readOnly", false);
          });
        }
      }

      function stopCodeExecution() {
        finish(EXIT_STOPPED, "Stopped on user request.");
      }

      function logFirstAccess() {
        $.get("log.php");
      };

      function jumpToLine(i) {
        var t = myCodeMirror.charCoords({line: i, ch: 0}, "local").top;
        var middleHeight = myCodeMirror.getScrollerElement().offsetHeight / 2;
        myCodeMirror.scrollTo(null, t - middleHeight - 5);
      }

      window.onload = function() {
          myCodeMirror = CodeMirror(document.getElementById("srcCode"), {
              lineNumbers: true,
              lineWrapping: true,
              mode: "javascript",
          });
          var url_string = window.location.href
          var url = new URL(url_string);
          var compressedSrcCode = url.searchParams.get("src");
          if (compressedSrcCode) {
            var decompressedSrcCode = LZString.decompressFromEncodedURIComponent(compressedSrcCode);
            loadProgFromSrc(decompressedSrcCode);
          } else {
            loadProg(0);
          }
          logFirstAccess();
      }

$("#share").on("click" , function(event){
    event.preventDefault();
    var srcCode = myCodeMirror.getValue();
    var compressed = LZString.compressToEncodedURIComponent(srcCode);
    var url = window.location.protocol+'//'+window.location.hostname+window.location.pathname;
    displayStatusMsg('<input id="urlToCopy" value="'+url+'?src='+compressed+'" size="80" /> <button id="copy"><i class="fa fa-files-o" aria-hidden="true"></i> Copy Url</button>');
    document.querySelector("#copy").addEventListener("click", function(event) {
        var copyText = document.querySelector("#urlToCopy");
        copyText.select();
        document.execCommand("copy");
    });
});

// Replace non-visible caracters by visible ones.
$("#srcCode").bind('paste drop', function(e) {
    var elem = $(this);

    setTimeout(function() {
        // gets the copied text after a specified time (100 milliseconds)
        var savedCursorPos = myCodeMirror.getCursor();
        var text = myCodeMirror.getValue();
        text = text.replace(/(\uE015)/g, 'r'); // Replace "rho" (U+E015 used in BIDE) by "r"
        text = text.replace(/(\uE016)/g, 'i'); // Replace "i" (imaginary unit of complex number) (U+E016 used in BIDE) by "i"
        text = text.replace(/(\uE063)/g, '/'); // Replace "slash" (U+E063 used in BIDE) by "/"
        myCodeMirror.setValue(text);
        myCodeMirror.setCursor(savedCursorPos); // Replace cursor where it was (because setting the value of the content place cursor at beginning)
    }, 100);
});

      //executeCode();
    </script>

  </body>
</html>
